package com.lishe.lishe.lishe.module.excitation.http;

import android.text.TextUtils;
import android.util.Log;
import android.widget.Toast;

import com.lishe.lishe.asynchttp.HttpUtils;
import com.lishe.lishe.lishe.ImageSelector.ImageObject;
import com.lishe.lishe.lishe.base.BaseApplication;
import com.lishe.lishe.lishe.common.Globals;
import com.lishe.lishe.lishe.utils.StringUtils;
import com.loopj.android.http.RequestParams;
import com.loopj.android.http.ResponseHandlerInterface;

import org.json.JSONObject;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by shino on 2017/10/22.
 */

public class HttpExcitation {
    private static final String key = "lishe_md5_key_56e057f20f883e";
    private static final String getAppBannerAll = "lshe.framework.protocol.http/api/appBanner/getAppBannerAll";//点赞墙Banner
    private static final String getNews = "lshe.framework.protocol.http/api/appNews/getNews";//APP消息
    private static final String eventList = "lshe.framework.excitation/api/appEncourage/eventList";//点赞墙列表
    private static final String getEventDetail = "lshe.framework.excitation/api/appEncourage/getEventDetail";//点赞详情
    private static final String getEventCommentList = "lshe.framework.excitation/api/appEncourage/getEventCommentList";//评论列表
    private static final String addEventComment = "lshe.framework.excitation/api/appEncourage/addEventComment";//添加评论
    private static final String hitEvent = "lshe.framework.excitation/api/appEncourage/hitEvent";//点赞事件
    private static final String cancelHitEvent = "lshe.framework.excitation/api/appEncourage/cancelHitEvent";//取消点赞
    private static final String shareEvent = "lshe.framework.excitation/api/appEncourage/shareEvent";//分享事件
    private static final String createEvent = "lshe.framework.excitation/api/appEncourage/createEvent";//发起点赞
    private static final String searchAdmiredUserList = "lshe.framework.excitation/api/appEncourage/searchAdmiredUserList";//搜索点赞对象
    private static final String searchDepartsAndEmps = "lshe.framework.excitation/api/appEncourage/searchDepartsAndEmps";//搜索组织架构及员工
    private static final String searchEncourageActions = "lshe.framework.excitation/api/appEncourage/searchEncourageActions";//搜索行为标签
    private static final String searchEncourageGifts = "lshe.framework.excitation/api/appEncourage/searchEncourageGifts";//搜索小礼
    private static final String getUserInfo = "lshe.framework.excitation/api/appEncourage/getUserInfo";//获取个人信息
    private static final String getUserAchieveList = "lshe.framework.excitation/api/appEncourage/getUserAchieveList";//获取个人成就列表
    private static final String getUserActionList = "lshe.framework.excitation/api/appEncourage/getUserActionList";//获取个人印象
    private static final String getUserEventList = "lshe.framework.excitation/api/appEncourage/getUserEventList";//获取被赞列表/点赞列表
    private static final String getAchieveDetail = "lshe.framework.excitation/api/appEncourage/getAchieveDetail";//获取成就详情
    private static final String receiveAchieveAward = "lshe.framework.excitation/api/appEncourage/receiveAchieveAward";//领取成就奖励
    private static final String shareAchievement = "lshe.framework.excitation/api/appEncourage/shareAchievement";//成就分享
    private static final String sendGift = "lshe.framework.excitation/api/appEncourage/sendGift";//赠送小礼
    private static final String exchangeGift = "lshe.framework.excitation/api/appEncourage/exchangeGift";//兑换小礼
    private static final String getUserGifts = "lshe.framework.excitation/api/appEncourage/getUserGifts";//获取用户小礼列表
    private static final String upFile = "lshe.framework.excitation/api/appEncourage/uploadFile";//上传文件

    /**
     * 点赞墙头部banner
     *
     * @param phoneNum 手机
     * @param comId    企业编号
     *                 sign加密标签
     */
    public static void getBanner(String phoneNum, String comId, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("phoneNum", phoneNum);
        signParams.put("comId", comId);
        String sign = StringUtils.createSignString(signParams) + key;
        Log.e("1sign", sign);
        sign = StringUtils.md5(sign);
        Log.e("2sign", sign);
        RequestParams params = new RequestParams();
        params.put("phoneNum", phoneNum);
        params.put("comId", comId);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + getAppBannerAll, params, response);
    }

    /**
     * 消息列表
     *
     * @param comId 企业编号   sign加密标签
     */
    public static void getNews(String comId, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("comId", comId);

        String sign = StringUtils.createSignString(signParams) + key;
        Log.e("1sign", sign);
        sign = StringUtils.md5(sign);
        Log.e("2sign", sign);
        RequestParams params = new RequestParams();
        params.put("comId", comId);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + getNews, params, response);
    }

    /**
     * 点赞墙列表
     *
     * @param token
     * @param pageNo   页码
     * @param pageSize 每页信息量
     */
    public static void getDianZanList(String token, String pageNo, String pageSize, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        signParams.put("pageNo", pageNo);
        signParams.put("pageSize", pageSize);

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("pageNo", pageNo);
        params.put("pageSize", pageSize);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + eventList, params, response);
    }

    /**
     * 点赞墙详情
     *
     * @param token
     * @param eventId 点赞事件ID
     *                http://xxxx/lshe.framework.excitation/api/appEncourage/getEventDetail
     */
    public static void getDianZanDetail(String token, String eventId, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        signParams.put("eventId", eventId);

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("eventId", eventId);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + getEventDetail, params, response);
    }

    /**
     * 评论列表
     * eventId 点赞事件的id
     *
     * @param token
     * @param pageSize 每页信息量
     */
    public static void getCommentList(String token, String eventId, String pageNo, String pageSize, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        signParams.put("eventId", eventId);
        signParams.put("pageNo", pageNo);
        signParams.put("pageSize", pageSize);

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("eventId", eventId);
        params.put("pageNo", pageNo);
        params.put("pageSize", pageSize);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + getEventCommentList, params, response);
    }

    /**
     * 添加 评论
     *
     * @param token
     * @param eventId      事件id
     * @param eventComment 评论内容
     */
    public static void addComment(String token, String eventId, String eventComment, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        signParams.put("eventId", eventId);
        signParams.put("eventComment", eventComment);

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("eventId", eventId);
        params.put("eventComment", eventComment);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + addEventComment, params, response);
    }

    /**
     * 点赞事件
     *
     * @param token
     * @param eventId 点赞事件Id
     */
    public static void dianZanEvent(String token, String eventId, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        signParams.put("eventId", eventId);

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("eventId", eventId);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + hitEvent, params, response);
    }

    /**
     * 取消点赞
     *
     * @param token
     * @param eventId 点赞事件Id
     */
    public static void cancleDianZanEvent(String token, String eventId, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        signParams.put("eventId", eventId);

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("eventId", eventId);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + cancelHitEvent, params, response);
    }

    /**
     * 分享事件（用于分享计数）
     *
     * @param token
     * @param eventId        点赞事件Id
     * @param forwardChannel 转发渠道
     */
    public static void shareEvent(String token, String eventId, String forwardChannel, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        signParams.put("eventId", eventId);
        signParams.put("forwardChannel", forwardChannel);

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("eventId", eventId);
        params.put("forwardChannel", forwardChannel);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + shareEvent, params, response);
    }

    /**
     * 发起点赞
     *
     * @param token
     * @param userId    点赞对象Id
     * @param actionId  行为标签Id
     * @param eventDesc 事件描述
     * @param showScope 可视范围 1：全公司，2：我所在部门 3：他所在部门
     * @param giftId    赠送小礼ID
     * @param imags     图片
     * @param response
     */
    public static void sendDianZanEvent(String token, String userId, String actionId, String eventDesc, String showScope,
                                        String giftId, List<ImageObject> imags, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        if (!TextUtils.isEmpty(userId)) {
            signParams.put("userId", userId);
        }
        signParams.put("actionId", actionId);
        signParams.put("eventDesc", eventDesc);
        signParams.put("showScope", showScope);
        if (imags != null) {
            int size = imags.size();
            if (size > 0) {
                signParams.put("img1", imags.get(0).getUrl());
                Log.e("1", imags.get(0).getUrl());
            }
            if (size > 1) {
                signParams.put("img2", imags.get(1).getUrl());
                Log.e("2", imags.get(0).getUrl());
            }
            if (size > 2) {
                signParams.put("img3", imags.get(2).getUrl());
                Log.e("3", imags.get(0).getUrl());
            }
        }
        if (!TextUtils.isEmpty(giftId)) {
            signParams.put("giftId", giftId);
        }


        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        if (!TextUtils.isEmpty(userId)) {
            params.put("userId", userId);
        }
        params.put("actionId", actionId);
        params.put("eventDesc", eventDesc);
        params.put("showScope", showScope);
        if (!TextUtils.isEmpty(giftId)) {
            params.put("giftId", giftId);
        }
        if (imags != null) {
            int size = imags.size();
            if (size > 0) {
                params.put("img1", imags.get(0).getUrl());
            }
            if (size > 1) {
                params.put("img2", imags.get(1).getUrl());
            }
            if (size > 2) {
                params.put("img3", imags.get(2).getUrl());
            }
        }
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + createEvent, params, response);
    }


    /**
     * 搜索点赞对象
     *
     * @param token
     * @param userName 点赞对象姓名
     * @param response
     */
    public static void searchDianZanPerson(String token, String userName, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        if (!TextUtils.isEmpty(userName)) {
            signParams.put("userName", userName);
        }

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("userName", userName);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + searchAdmiredUserList, params, response);
    }

    /**
     * 搜索组织架构及员工
     *
     * @param token
     * @param departId 部门Id
     * @param response
     */
    public static void searchOrganization(String token, String departId, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        if (!TextUtils.isEmpty(departId)) {
            signParams.put("departId", departId);
        }
//        signParams.put("pageNo", pageNo);
//        signParams.put("pageSize", pageSize);

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("departId", departId);
//        params.put("pageNo", pageNo);
//        params.put("pageSize", pageSize);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + searchDepartsAndEmps, params, response);
    }

    /**
     * 搜索行为标签
     *
     * @param token
     * @param condition 搜索条件
     * @param response
     */
    public static void searchEncourageActions(String token, String condition, String pageNo, String pageSize, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        if (!TextUtils.isEmpty(condition)) {
            signParams.put("condition", condition);
        }
        signParams.put("pageNo", pageNo);
        signParams.put("pageSize", pageSize);

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("condition", condition);
        params.put("pageNo", pageNo);
        params.put("pageSize", pageSize);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + searchEncourageActions, params, response);
    }

    /**
     * 搜索小礼
     *
     * @param token
     * @param response http://xxxx/lshe.framework.excitation/api/appEncourage/searchEncourageGifts
     */
    public static void searchEncourageGifts(String token, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + searchEncourageGifts, params, response);
    }

    /**
     * 获取个人信息
     *
     * @param token
     * @param response
     */
    public static void getUserInfo(String token, String userId, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        if (!TextUtils.isEmpty(userId)) {
            signParams.put("userId", userId);
        }
        signParams.put("token", token);

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("userId", userId);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + getUserInfo, params, response);
    }

    /**
     * 获取个人成就列表
     *
     * @param token
     * @param response
     */
    public static void getUserAchieveList(String token, String userId, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        if (!TextUtils.isEmpty(userId)) {
            signParams.put("userId", userId);
        }

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("userId", userId);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + getUserAchieveList, params, response);
    }

    /**
     * 获取个人印象
     *
     * @param token
     * @param response
     */
    public static void getUserActionList(String token, String userId, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        if (!TextUtils.isEmpty(userId)) {
            signParams.put("userId", userId);
        }

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("userId", userId);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + getUserActionList, params, response);
    }

    /**
     * 获取被赞列表/点赞列表
     *
     * @param token
     * @param userId   用户ID
     * @param type     类型 1：点赞 2：被赞
     * @param pageNo
     * @param pageSize
     * @param response
     */
    public static void getUserEventList(String token, String userId, String type, String pageNo, String pageSize, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        if (!TextUtils.isEmpty(userId)) {
            signParams.put("userId", userId);
        }
        signParams.put("type", type);
        signParams.put("pageNo", pageNo);
        signParams.put("pageSize", pageSize);

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("userId", userId);
        params.put("type", type);
        params.put("pageNo", pageNo);
        params.put("pageSize", pageSize);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + getUserEventList, params, response);
    }

    /**
     * 获取成就详情
     *
     * @param token
     * @param userId    用户ID
     * @param achieveId 成就ID
     * @param response
     */
    public static void getAchieveDetail(String token, String userId, String achieveId, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        if (!TextUtils.isEmpty(userId)) {
            signParams.put("userId", userId);
        }
        signParams.put("achieveId", achieveId);

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("userId", userId);
        params.put("achieveId", achieveId);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + getAchieveDetail, params, response);
    }

    /**
     * 领取成就奖励
     *
     * @param token
     * @param userId    用户ID
     * @param achieveId 成就ID
     * @param response
     */
    public static void receiveAchieveAward(String token, String userId, String achieveId, ResponseHandlerInterface response) {
        JSONObject jsonObject = new JSONObject();
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        if (!TextUtils.isEmpty(userId)) {
            signParams.put("userId", userId);
        }
        signParams.put("achieveId", achieveId);

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("userId", userId);
        params.put("achieveId", achieveId);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + receiveAchieveAward, params, response);
    }

    /**
     * 成就分享
     *
     * @param token
     * @param achieveId      成就ID
     * @param forwardChannel 转发渠道
     * @param response
     */
    public static void shareAchievement(String token, String achieveId, String forwardChannel, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        signParams.put("achieveId", achieveId);
        signParams.put("forwardChannel", forwardChannel);

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("achieveId", achieveId);
        params.put("forwardChannel", forwardChannel);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + shareAchievement, params, response);
    }

    /**
     * 赠送小礼
     *
     * @param token
     * @param eventUserId 接收人Id
     * @param giftId      小礼Idd
     * @param eventId     事件Id
     * @param pointsType  积分类型：1：通用积分（目前只支持通用积分）
     * @param response
     */
    public static void sendGift(String token, String eventUserId, String giftId, String eventId, String pointsType, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        signParams.put("eventUserId", eventUserId);
        signParams.put("giftId", giftId);
        signParams.put("eventId", eventId);
        signParams.put("pointsType", pointsType);

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("eventUserId", eventUserId);
        params.put("giftId", giftId);
        params.put("eventId", eventId);
        params.put("pointsType", pointsType);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + sendGift, params, response);
    }

    /**
     * 兑换小礼
     *
     * @param token
     * @param exchangeGiftIds 兑换小礼Ids（多个Id用英文逗号隔开，如：12,13）
     * @param response
     */
    public static void exchangeGift(String token, String exchangeGiftIds, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        signParams.put("exchangeGiftIds", exchangeGiftIds);

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("exchangeGiftIds", exchangeGiftIds);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + exchangeGift, params, response);
    }

    /**
     * 获取用户小礼列表
     *
     * @param token
     * @param userId
     * @param pageNo
     * @param pageSize
     * @param response
     */
    public static void getUserGifts(String token, String userId, int pageNo, int pageSize, ResponseHandlerInterface response) {
        Map<String, String> signParams = new HashMap<>();
        signParams.put("token", token);
        if (!TextUtils.isEmpty(userId)) {
            signParams.put("userId", userId);
        }
        signParams.put("pageNo", String.valueOf(pageNo));
        signParams.put("pageSize", String.valueOf(pageSize));

        String sign = StringUtils.createSignString(signParams) + key;
        sign = StringUtils.md5(sign);
        RequestParams params = new RequestParams();
        params.put("token", token);
        params.put("userId", userId);
        params.put("sign", sign);
        params.put("pageNo", pageNo);
        params.put("pageSize", pageSize);
        params.put("sign", sign);
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + getUserGifts, params, response);
    }


    /**
     * asyHttp上传文件和图片
     */
    public static void upFile(String token, List<String> paths, ResponseHandlerInterface response) {
        RequestParams params = new RequestParams();
        params.put("token", token);
        for (int i = 0; i < paths.size(); i++) {
            File file = new File(paths.get(i));
            if (!file.exists()) {
                Toast.makeText(BaseApplication.getContext(), "文件不存在", Toast.LENGTH_SHORT).show();
                return;
            }
            String name = "imgFile" + (i + 1);
            Log.e("上传的图片名", name);
            try {
                params.put(name, file);
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }
        HttpUtils.post(Globals.LISHE_URL_EXCITATION + upFile, params, response);
    }

}
